﻿//*************************************************************************
//面向服务的协作式智能交通系统仿真软件SoC-ITSS v2.1 alpha
//发布单位：西北工业大学--巴黎高科MINES机器人与群智能系统联合实验室
//团队负责人：张凯龙 Zhang Kailong
//团队成员：张大方、杨安胜、王敏、谢策、王雨佳、谢尘玉等
//联系我们：kl.zhang@nwpu.edu.cn
//2012-2021
//*************************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CyberCarSimulation.Bean;

//*******************************************************
//
//文件名(File Name):           Definitions.cs
//
//数据表(Tables):              nothing 
//
//          修改理由：         定义属性
//
//*******************************************************

namespace CyberCarSimulation.Regulation
{
    /************************************************************************/
    /**
     * 设定车辆的坐标计算因子、初始坐标、终止坐标以及S_CS中心点的坐标
     */
    /************************************************************************/
    class Coordinate
    {
        public struct coordinate
        {
            public float X;             //车辆的X坐标
            public float Y;             //车辆的Y坐标
        };


        //存储车辆的显示信息，坐标进行比例尺转换
        public class coordinate_i
        {
            public float[] X = new float[6] { 0, 0, 0, 0, 0, 0 };             //车辆的X坐标
            public float[] Y = new float[6] { 0, 0, 0, 0, 0, 0 };             //车辆的Y坐标
            public string ID;           //车辆的ID号
            public coordinate_i()       //coordinate_i构造方法
            {
                X[0] = 0;
                X[1] = 0;
                X[2] = 0;
                X[3] = 0;
                X[4] = 0;
                X[5] = 0;
                Y[0] = 0;
                Y[1] = 0;
                Y[2] = 0;
                Y[3] = 0;
                Y[4] = 0;
                Y[5] = 0;
            }
        }

        //存储车辆的显示信息，坐标未进行比例尺转换
        public class gui_coordinate
        {
            public float[] X = new float[6] { 0, 0, 0, 0, 0, 0 };    //车辆的X坐标
            public float[] Y = new float[6] { 0, 0, 0, 0, 0, 0 };    //车辆的Y坐标
            public int LaneID;          //现所处道路编号
            public int OriginalPriority;//原优先级
            public int CurrentPriority; //现优先级
            public string ID;           //车辆编号
            public string Sections;     //车辆的临界区
            public bool IsAuthorized = false;   //车辆上是否被授权
            public int CarType;                 //车辆类型
            public int Original_Dir;            //车辆的原方向
            public int Origianl_LaneID;         //现所处道路编号'
            public string IntersctionID;        //车辆所属的路口
            public int IntersectionNumber;      //车辆所属的路口序号
            public gui_coordinate()
            {
                X[0] = 0;
                X[1] = 0;
                X[2] = 0;
                X[3] = 0;
                X[4] = 0;
                X[5] = 0;
                Y[0] = 0;
                Y[1] = 0;
                Y[2] = 0;
                Y[3] = 0;
                Y[4] = 0;
                Y[5] = 0;
            }
        }
        
        /**
         * 坐标计算的相关变量，按照车道方向（或包括行进方向）进行存取
         */
        public static coordinate[] CoordinateStrFactor;         //直线坐标计算正负因子，用于将前进方向对应到具体的加减运算。
        //取用方法为Coordinate.CoordinateStrFactor[车辆现在所处车道编号]

        public static coordinate[] CoordinateOrigin;            //Vehicle对象刚进入仿真区域时的坐标值（车头中心点），
        //取用方法为Coordinate.CoordinateOrigin[车辆初始车道编号]。

        public static coordinate[] CoordinateDestination;       //Vehicle对象离开仿真区域时的坐标值（车头中心点），若设定为9999则表示计算时无需考虑该项，
        //取用方法为Coordinate.CoordinateOrigin[车辆目标车道编号]。

     

        public static coordinate[,] CircleCenter;               //大车坐标轴的原点坐标信息，取用方法为Coordinate.CircleCenter[车辆初始车道编号，车辆前行方向]

        public static coordinate[,] CircleCenterSmall;          //小车坐标轴的原点坐标信息，取用方法为Coordinate.CircleCenterSmall[车辆初始车道编号，车辆前行方向]

        public static coordinate[,] CircleFactor;               //转弯过程中的坐标换算因子，取用方法为[车辆初始车道编号，车辆前行方向]  

        public static coordinate[,] TurnPreXYFactor;            //其余点相较于当前车辆的坐标变换因子，取用方法[车辆类型，车辆初始车道编号，相对于FrontMiddle的位置]   
        public static coordinate[, ,] TurnPreXY;    //车辆转弯前的FrontMiddle点的XY坐标值，取用方法[车辆初始车道编号，车辆前行方向]  

        public static float[, ,] TurnPreRadian;      //车辆在转弯之前的各角的角度情况，取用方法为[车辆初始车道编号，车辆前行方向,相对于FrontMiddle的位置]  


        /************************************************************************/
        /* 临界区的判定线设置                                                                     */
        /************************************************************************/
        /*进入线*/
        public static float EnterLine = 0.0f;
        /*预约线 = 进入线 + 刹车距离*/
        public static float ReservationLine = 0.0f;
        /*预约前减速长度*/
        public static float ResPreDis = 0.0f;
        /*车辆的临界区界限*/
        public static float[, , ,] DeadLine = null;
        /*临界区线*/
        public static float IntersactionEnterLine = 90.0f;
        /*临界区前刹车线 = 临界区线 - 刹车距离*/
        public static float IntersactionStopLine = 0.0f;
        /*车辆的删除线*/
        //public static float IntersactionDelLine = 184.0f;
        public static float IntersactionDelLine = 500.0f;
        //车辆在交叉路口钱的刹车长度
        public static float Brakelength = 0.0f;

        /*车辆理想情况下开始到达进入线的时间*/
        public static float EnterTime = 0.0f;
        /*车辆理想情况下开始预约的时间*/
        public static float ReservationTime = 0.0f;
        /*车辆的车道进入（临界区）时间*/
        public static float IntersationEnterTime = 0.0f;

        /*车辆的路程校正*/
        public static float[,] CorrectionDis = null;
        /*标志车辆当前所处的位置，取用方法是*/
        public static float[, , ,] Position = null;

        /*标识当前车辆的转弯线，取用方法是[车辆类型，车辆方向，车辆所处转弯位置]*/
        public static float[, ,] TurnState = new float[3, 4, 5];

        /************************************************************************/
        /* 车辆的半径信息                                                                     */
        /************************************************************************/
        public static float[] Radius = new float[3];        //车辆的半径
        public static float[] Perimeter = new float[3];     //车辆的1/4周长
        public static float[, ,] Radius_Vertex = new float[6, 3, 6];  //大车各顶点的半径，取用方法是[车辆类型，车辆方向,车辆的顶点]

        public static void setParams()
        {
            /*起点坐标*/
            Coordinate.CoordinateOrigin = new coordinate[5];
            /*终点坐标*/
            Coordinate.CoordinateDestination = new coordinate[5];
            
            /*大车转弯坐标轴原点坐标*/
            Coordinate.CircleCenter = new coordinate[5, 4];
            /*小车转弯坐标轴原点坐标*/
            Coordinate.CircleCenterSmall = new coordinate[5, 4];
            /*直线坐标计算正负因子*/
            Coordinate.CoordinateStrFactor = new coordinate[5];
            /*曲线坐标计算正负因子*/
            Coordinate.CircleFactor = new coordinate[5, 4];
            /*车辆的临界区界限*/
            Coordinate.DeadLine = new float[3, 4, 3, 6];
            //车辆的位置信息
            Coordinate.Position = new float[3, 4, 3, 3];
            //车辆的路程校正
            Coordinate.CorrectionDis = new float[3, 4];

            //车辆的转弯前的X、Y坐标轴计算正负因子
            Coordinate.TurnPreXYFactor = new coordinate[5, 6];             //其余点相较于当前车辆的坐标变换   
            Coordinate.TurnPreXY = new coordinate[3, 5, 4];
            Coordinate.TurnPreRadian = new float[3, 4, 6];




            //xc注释
            //刹车距离 车速从巡航的6减速到0所走的距离 ==》4.5
            Coordinate.Brakelength = (float)Math.Round(Math.Abs(MainData.SimulationConfig.GetTxtCruisingSpeed() * MainData.SimulationConfig.GetTxtCruisingSpeed() * 0.50f / MainData.SimulationConfig.GetTxtMaximumDeceleration()), Definitions.Precise);
            //刹车线 = 临界区线 - 刹车距离 - 车辆安全距离 90-4.5-1=84.5
            Coordinate.IntersactionStopLine = (float)Math.Round(Coordinate.IntersactionEnterLine - Vehicle.SAFE_DISTANCE -
                                        Math.Abs(MainData.SimulationConfig.GetTxtCruisingSpeed() * MainData.SimulationConfig.GetTxtCruisingSpeed() * 0.50f / MainData.SimulationConfig.GetTxtMaximumDeceleration()), Definitions.Precise);

            //预约线前减速距离 车速从最大10减速到巡航速度6所走的距离 ==》8
            Coordinate.ResPreDis = (float)Math.Round(Math.Abs(((MainData.SimulationConfig.GetTxtMaximumSpeed() * MainData.SimulationConfig.GetTxtMaximumSpeed() -
                                                       MainData.SimulationConfig.GetTxtCruisingSpeed() * MainData.SimulationConfig.GetTxtCruisingSpeed()) * 0.50f / MainData.SimulationConfig.GetTxtMaximumDeceleration())), Definitions.Precise);

            //进入线 = 临界区线 - 减速距离 - 预约线长度 - 刹车线 90-8-30-5.5=46.5
            Coordinate.EnterLine = Coordinate.IntersactionStopLine - MainData.SimulationConfig.GetTxtReservationLineLength() - Coordinate.ResPreDis;
           
            //预约线 = 进入线 + 减速距离 46.5+8=54.5
            Coordinate.ReservationLine = Coordinate.EnterLine + (float)Math.Round(Math.Abs(((MainData.SimulationConfig.GetTxtMaximumSpeed() * MainData.SimulationConfig.GetTxtMaximumSpeed() -
                                                        MainData.SimulationConfig.GetTxtCruisingSpeed() * MainData.SimulationConfig.GetTxtCruisingSpeed()) * 0.50f / MainData.SimulationConfig.GetTxtMaximumDeceleration())), Definitions.Precise);
            //车辆理想情况下到达进入线的时间 46.5/10=4.65            
            Coordinate.EnterTime = Coordinate.EnterLine / MainData.SimulationConfig.GetTxtMaximumSpeed();
            //车辆理想情况下到达预约线时间 = 到进入线的时间 + 减速时间 ==》5.65
            Coordinate.ReservationTime = Coordinate.EnterTime + Math.Abs((MainData.SimulationConfig.GetTxtMaximumSpeed() - MainData.SimulationConfig.GetTxtCruisingSpeed()) / MainData.SimulationConfig.GetTxtMaximumDeceleration());
            //车辆理想情况下到达临界区时间 = 到达预约线的时间 + （临界区线 - 预约线）/ 巡航速度 ==》11.56
            Coordinate.IntersationEnterTime = Coordinate.ReservationTime
                            + (Coordinate.IntersactionEnterLine - Coordinate.ReservationLine) / MainData.SimulationConfig.GetTxtCruisingSpeed();

        

            //大车坐标轴的原点
            /*由西向东的方向*/
            Coordinate.CircleCenter[Definitions.WtoE_Lane, Definitions.Left].X = 90.0f;
            Coordinate.CircleCenter[Definitions.WtoE_Lane, Definitions.Left].Y = 90.0f;
            Coordinate.CircleCenter[Definitions.WtoE_Lane, Definitions.Right].X = 86.5f;
            Coordinate.CircleCenter[Definitions.WtoE_Lane, Definitions.Right].Y = 100.5f;
            /*由东向西的方向*/
            Coordinate.CircleCenter[Definitions.EtoW_Lane, Definitions.Left].X = 97.0f;
            Coordinate.CircleCenter[Definitions.EtoW_Lane, Definitions.Left].Y = 97.0f;
            Coordinate.CircleCenter[Definitions.EtoW_Lane, Definitions.Right].X = 100.5f;
            Coordinate.CircleCenter[Definitions.EtoW_Lane, Definitions.Right].Y = 86.5f;
            /*由北向南的方向*/
            Coordinate.CircleCenter[Definitions.NtoS_Lane, Definitions.Left].X = 97.0f;
            Coordinate.CircleCenter[Definitions.NtoS_Lane, Definitions.Left].Y = 90.0f;
            Coordinate.CircleCenter[Definitions.NtoS_Lane, Definitions.Right].X = 86.5f;
            Coordinate.CircleCenter[Definitions.NtoS_Lane, Definitions.Right].Y = 86.5f;
            /*由南向北的方向*/
            Coordinate.CircleCenter[Definitions.StoN_Lane, Definitions.Left].X = 90.0f;
            Coordinate.CircleCenter[Definitions.StoN_Lane, Definitions.Left].Y = 97.0f;
            Coordinate.CircleCenter[Definitions.StoN_Lane, Definitions.Right].X = 100.5f;
            Coordinate.CircleCenter[Definitions.StoN_Lane, Definitions.Right].Y = 100.5f;

            //小车坐标轴的原点
            //由西向东的方向
            Coordinate.CircleCenterSmall[Definitions.WtoE_Lane, Definitions.Left].X = 91.5f;
            Coordinate.CircleCenterSmall[Definitions.WtoE_Lane, Definitions.Left].Y = 91.5f;
            Coordinate.CircleCenterSmall[Definitions.WtoE_Lane, Definitions.Right].X = 88f;
            Coordinate.CircleCenterSmall[Definitions.WtoE_Lane, Definitions.Right].Y = 99f;
            /*由东向西的方向*/
            Coordinate.CircleCenterSmall[Definitions.EtoW_Lane, Definitions.Left].X = 95.5f;
            Coordinate.CircleCenterSmall[Definitions.EtoW_Lane, Definitions.Left].Y = 95.5f;
            Coordinate.CircleCenterSmall[Definitions.EtoW_Lane, Definitions.Right].X = 99f;
            Coordinate.CircleCenterSmall[Definitions.EtoW_Lane, Definitions.Right].Y = 88f;
            /*由北向南的方向*/
            Coordinate.CircleCenterSmall[Definitions.NtoS_Lane, Definitions.Left].X = 95.5f;
            Coordinate.CircleCenterSmall[Definitions.NtoS_Lane, Definitions.Left].Y = 91.5f;
            Coordinate.CircleCenterSmall[Definitions.NtoS_Lane, Definitions.Right].X = 88f;
            Coordinate.CircleCenterSmall[Definitions.NtoS_Lane, Definitions.Right].Y = 88f;
            /*由南向北的方向*/
            Coordinate.CircleCenterSmall[Definitions.StoN_Lane, Definitions.Left].X = 91.5f;
            Coordinate.CircleCenterSmall[Definitions.StoN_Lane, Definitions.Left].Y = 95.5f;
            Coordinate.CircleCenterSmall[Definitions.StoN_Lane, Definitions.Right].X = 99f;
            Coordinate.CircleCenterSmall[Definitions.StoN_Lane, Definitions.Right].Y = 99f;


            Coordinate.Radius[Definitions.BigCar] = (float)Math.Sqrt(5.25 * 5.25 + 3.4 * 3.4);     //大车半径(前面中点转弯半径)
            Coordinate.Radius[Definitions.SmallCar] = (float)Math.Sqrt(3.75 * 3.75 + 2.88 * 2.88);   //小车半径(前面中点转弯半径)

            Coordinate.Perimeter[Definitions.BigCar] = (float)(Coordinate.Radius[Definitions.BigCar] * Math.PI / 2);        //大车1/4园周长(前面中点转弯半径)
            Coordinate.Perimeter[Definitions.SmallCar] = (float)(Coordinate.Radius[Definitions.SmallCar] * Math.PI / 2);     //小车1/4园周长(前面中点转弯半径)

            //车辆各点的转弯半径 
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Left, Definitions.FrontMiddle] = (float)Math.Sqrt(5.25 * 5.25 + 3.4 * 3.4);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Left, Definitions.FrontLeft] = (float)Math.Sqrt(4.45 * 4.45 + 3.4 * 3.4);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Left, Definitions.FrontRight] = (float)Math.Sqrt(6.05 * 6.05 + 3.4 * 3.4);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Left, Definitions.BackLeft] = (float)Math.Sqrt(4.45 * 4.45 + 1.1 * 1.1);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Left, Definitions.BackRight] = (float)Math.Sqrt(6.05 * 6.05 + 1.1 * 1.1);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Right, Definitions.FrontMiddle] = (float)Math.Sqrt(5.25 * 5.25 + 3.4 * 3.4);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Right, Definitions.FrontLeft] = (float)Math.Sqrt(6.05 * 6.05 + 3.4 * 3.4);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Right, Definitions.FrontRight] = (float)Math.Sqrt(4.45 * 4.45 + 3.4 * 3.4);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Right, Definitions.BackLeft] = (float)Math.Sqrt(6.05 * 6.05 + 1.1 * 1.1);
            Coordinate.Radius_Vertex[Definitions.BigCar, Definitions.Right, Definitions.BackRight] = (float)Math.Sqrt(4.45 * 4.45 + 1.1 * 1.1);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Left, Definitions.FrontMiddle] = (float)Math.Sqrt(3.75 * 3.75 + 2.88 * 2.88);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Left, Definitions.FrontLeft] = (float)Math.Sqrt(3 * 3 + 2.88 * 2.88);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Left, Definitions.FrontRight] = (float)Math.Sqrt(4.5 * 4.5 + 2.88 * 2.88);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Left, Definitions.BackLeft] = (float)Math.Sqrt(3 * 3 + 0.72 * 0.72);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Left, Definitions.BackRight] = (float)Math.Sqrt(4.5 * 4.5 + 0.72 * 0.72);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Right, Definitions.FrontMiddle] = (float)Math.Sqrt(3.75 * 3.75 + 2.88 * 2.88);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Right, Definitions.FrontLeft] = (float)Math.Sqrt(4.5 * 4.5 + 2.88 * 2.88);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Right, Definitions.FrontRight] = (float)Math.Sqrt(3 * 3 + 2.88 * 2.88);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Right, Definitions.BackLeft] = (float)Math.Sqrt(4.5 * 4.5 + 0.72 * 0.72);
            Coordinate.Radius_Vertex[Definitions.SmallCar, Definitions.Right, Definitions.BackRight] = (float)Math.Sqrt(3 * 3 + 0.72 * 0.72);
            /************************************************************************/
            /* 车辆在各临界区，状态区的进入离开线                                                                     */
            /************************************************************************/
            //用于标识不同车辆的转弯状态进入离开线
            Coordinate.TurnState[Definitions.BigCar, Definitions.Left, Definitions.PreTurn] = 90.0f + 3.4f;
            Coordinate.TurnState[Definitions.BigCar, Definitions.Left, Definitions.Turning] = Coordinate.TurnState[Definitions.BigCar, Definitions.Left, Definitions.PreTurn] + Coordinate.Perimeter[Definitions.BigCar];
            Coordinate.TurnState[Definitions.BigCar, Definitions.Left, Definitions.AfterTurn] = Coordinate.TurnState[Definitions.BigCar, Definitions.Left, Definitions.Turning] + 90f;

            Coordinate.TurnState[Definitions.BigCar, Definitions.Right, Definitions.PreTurn] = 90.0f - 3.5f + 3.4f;
            Coordinate.TurnState[Definitions.BigCar, Definitions.Right, Definitions.Turning] = Coordinate.TurnState[Definitions.BigCar, Definitions.Right, Definitions.PreTurn] + Coordinate.Perimeter[Definitions.BigCar];
            Coordinate.TurnState[Definitions.BigCar, Definitions.Right, Definitions.AfterTurn] = Coordinate.TurnState[Definitions.BigCar, Definitions.Right, Definitions.Turning] + 90f - 3.5f;

            Coordinate.TurnState[Definitions.SmallCar, Definitions.Left, Definitions.PreTurn] = 90.0f + 3.5f + 0.88f;
            Coordinate.TurnState[Definitions.SmallCar, Definitions.Left, Definitions.Turning] = Coordinate.TurnState[Definitions.SmallCar, Definitions.Left, Definitions.PreTurn] + Coordinate.Perimeter[Definitions.SmallCar];
            Coordinate.TurnState[Definitions.SmallCar, Definitions.Left, Definitions.AfterTurn] = Coordinate.TurnState[Definitions.SmallCar, Definitions.Left, Definitions.Turning] + 90f + 1.5f;

            Coordinate.TurnState[Definitions.SmallCar, Definitions.Right, Definitions.PreTurn] = 90.0f - 3.5f + 2.88f + 1.5f;
            Coordinate.TurnState[Definitions.SmallCar, Definitions.Right, Definitions.Turning] = Coordinate.TurnState[Definitions.SmallCar, Definitions.Right, Definitions.PreTurn] + Coordinate.Perimeter[Definitions.SmallCar];
            Coordinate.TurnState[Definitions.SmallCar, Definitions.Right, Definitions.AfterTurn] = Coordinate.TurnState[Definitions.SmallCar, Definitions.Right, Definitions.Turning] + 90f - 2f;


            //基于目标车道的路径校正
            Coordinate.CorrectionDis[Definitions.BigCar, Definitions.Left] = 3.4f;
            Coordinate.CorrectionDis[Definitions.BigCar, Definitions.Straight] = 0f;
            Coordinate.CorrectionDis[Definitions.BigCar, Definitions.Right] = 3.5f + 3.4f;
            Coordinate.CorrectionDis[Definitions.SmallCar, Definitions.Left] = 1.38f;
            Coordinate.CorrectionDis[Definitions.SmallCar, Definitions.Straight] = 0f;
            Coordinate.CorrectionDis[Definitions.SmallCar, Definitions.Right] = 2.88f + 2f;

            // 大车左转到达临界区的界限
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 1] = 90.0f;
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 1] + 3.4f + 0.10387459654980040f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 3] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 2] + 1.4177128326201121f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 4] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 3] + 0.55603300107049813f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 5] = 99990.0f;
            // 大车左转离开临界区的界限
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 1] = (float)(90.0f + 3.4f + 6.3142368903598340);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 1] + 0.63549083285405217f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 3] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 2] + 0.21289522123676097f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 4] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 3] + 2.6623914246243499f + 1.1f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 5] = 99990.0f;
            // 大车右转到达临界区的界限
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Right, Definitions.Arrive, 1] = (float)(90.0f - 3.5f + 3.4f + 0.10387459654980040f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Right, Definitions.Arrive, 2] = 99990.0f;
            // 大车右转离开临界区的界限
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Right, Definitions.Leave, 1] = (float)(90.0f - 3.5f + 3.4f + 7.1626229444506473f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Right, Definitions.Leave, 2] = 99990.0f;
            // 大车直行到达临界区
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 1] = (float)(90.0f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 1] + 3.5f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 3] = 99990.0f;
            // 大车直行离开临界区
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Leave, 1] = (float)(90.0f + 3.5f + 4.5f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Leave, 1] + 3.5f);
            Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Leave, 3] = 99990.0f;

            // 小车左转到达临界区的界限
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 1] = (float)(90.0f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 2] = (float)(Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 1] + 3.5f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 3] = (float)(Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 2] + 0.88f + 1.4378513035297329f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 4] = 99990.0f;
            // 小车左转离开临界区的界限
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 1] = (float)(90.0f + 3.5f + 0.88f + 4.4485795141261155f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 2] = (float)((float)(Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 1] + 1.5805772467472448f));
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 3] = (float)(90.0f + 3.5f + 0.88f + Coordinate.Perimeter[Definitions.SmallCar] + 2.22f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 4] = 99990.0f;
            // 小车右转到达临界区的界限
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Right, Definitions.Arrive, 1] = (float)(90.0f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Right, Definitions.Arrive, 2] = 99990.0f;
            // 小车右转离开临界区的界限
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Right, Definitions.Leave, 1] = (float)(90.0f + 2.88f - 2f + 6.0291567608733603f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Right, Definitions.Leave, 2] = 99990.0f;
            // 小车直行到达临界区
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Arrive, 1] = (float)(90.0f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Arrive, 2] = (float)(Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Arrive, 1] + 3.5f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Arrive, 3] = 99990.0f;
            // 小车直行离开临界区
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Leave, 1] = (float)(90.0f + 3.5f + 3.6f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Leave, 1] + 3.5f);
            Coordinate.DeadLine[Definitions.SmallCar, Definitions.Straight, Definitions.Leave, 3] = 99990.0f;

            //大车左行到达临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 1] = Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 1];
            Coordinate.Position[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Arrive, 4] + 3.6665791706840154f);
            //大车左行离开临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.BigCar, Definitions.Left, Definitions.Leave, 1] = (float)(90.0f + 3.4f + 1.5157450391046021f);
            Coordinate.Position[Definitions.BigCar, Definitions.Left, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Left, Definitions.Leave, 4]);
            //大车右行到达临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.BigCar, Definitions.Right, Definitions.Arrive, 1] = Coordinate.DeadLine[Definitions.BigCar, Definitions.Right, Definitions.Arrive, 1];
            Coordinate.Position[Definitions.BigCar, Definitions.Right, Definitions.Arrive, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Right, Definitions.Arrive, 1] + 1.4177128326201121f);
            //大车右行离开临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.BigCar, Definitions.Right, Definitions.Leave, 1] = (float)(90.0f - 3.5f + 3.4f + 6.3142368903598340f);
            Coordinate.Position[Definitions.BigCar, Definitions.Right, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Right, Definitions.Leave, 1]);
            //大车直行到达临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 1] = Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 1];
            Coordinate.Position[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Arrive, 1] + 7f);
            //大车直行离开临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.BigCar, Definitions.Straight, Definitions.Leave, 1] = (float)(90.0f + 4.5f);
            Coordinate.Position[Definitions.BigCar, Definitions.Straight, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.BigCar, Definitions.Straight, Definitions.Leave, 2]);

            //小车左行到达临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 1] = 90.0f;
            Coordinate.Position[Definitions.SmallCar, Definitions.Left, Definitions.Arrive, 2] = (float)(90.0f + 3.5f + 0.88f + 5.5511222167790946f);
            //小车左行离开临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 1] = (float)(90.0f + 3.6f);
            Coordinate.Position[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.SmallCar, Definitions.Left, Definitions.Leave, 3]);
            //小车右行到达临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.SmallCar, Definitions.Right, Definitions.Arrive, 1] = 90.0f;
            Coordinate.Position[Definitions.SmallCar, Definitions.Right, Definitions.Arrive, 2] = (float)(90.0f + 0.88f + 1.4378513035297329f);
            //小车右行离开临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.SmallCar, Definitions.Right, Definitions.Leave, 1] = (float)(90.0f + 0.88f + 4.4485795141261155f);
            Coordinate.Position[Definitions.SmallCar, Definitions.Right, Definitions.Leave, 2] = (float)(Coordinate.DeadLine[Definitions.SmallCar, Definitions.Right, Definitions.Leave, 1]);
            //小车直行到达临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.SmallCar, Definitions.Straight, Definitions.Arrive, 1] = 90.0f;
            Coordinate.Position[Definitions.SmallCar, Definitions.Straight, Definitions.Arrive, 2] = (float)(90.0f + 7.0f);
            //小车直行离开临界区、与目标车道时走过的路程
            Coordinate.Position[Definitions.SmallCar, Definitions.Straight, Definitions.Leave, 1] = (float)(90.0f + 3.6f);
            Coordinate.Position[Definitions.SmallCar, Definitions.Straight, Definitions.Leave, 2] = (float)(90.0f + 3.6f + 7.0f);

            /************************************************************************/
            /* 转弯开始状态,用于求不同车辆在开始转弯状态下的X、Y坐标，取用方法为[车辆初始车道编号，车辆前行方向]                                                                       */
            /************************************************************************/
            //存储车辆的转弯前的X、Y坐标轴，取用方法为[车辆初始车道编号，车辆前行方向]  
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.FrontLeft].X = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.FrontLeft].Y = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.FrontRight].X = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.FrontRight].Y = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.BackLeft].X = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.BackLeft].Y = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.BackRight].X = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.WtoE_Lane, Definitions.BackRight].Y = 1.0f;

            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.FrontLeft].X = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.FrontLeft].Y = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.FrontRight].X = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.FrontRight].Y = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.BackLeft].X = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.BackLeft].Y = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.BackRight].X = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.StoN_Lane, Definitions.BackRight].Y = 1.0f;

            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.FrontLeft].X = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.FrontLeft].Y = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.FrontRight].X = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.FrontRight].Y = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.BackLeft].X = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.BackLeft].Y = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.BackRight].X = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.EtoW_Lane, Definitions.BackRight].Y = -1.0f;

            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.FrontLeft].X = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.FrontLeft].Y = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.FrontRight].X = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.FrontRight].Y = 0.0f;
            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.BackLeft].X = 1.0f;
            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.BackLeft].Y = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.BackRight].X = -1.0f;
            Coordinate.TurnPreXYFactor[Definitions.NtoS_Lane, Definitions.BackRight].Y = -1.0f;

            //车辆转弯开始时FrontMiddle的X、Y值 
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.WtoE_Lane, Definitions.Left].X = 93.4f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.WtoE_Lane, Definitions.Left].Y = 95.25f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.StoN_Lane, Definitions.Left].X = 95.25f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.StoN_Lane, Definitions.Left].Y = 93.6f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.EtoW_Lane, Definitions.Left].X = 93.6f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.EtoW_Lane, Definitions.Left].Y = 91.75f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.NtoS_Lane, Definitions.Left].X = 91.75f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.NtoS_Lane, Definitions.Left].Y = 93.4f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.WtoE_Lane, Definitions.Right].X = 89.9f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.WtoE_Lane, Definitions.Right].Y = 95.25f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.StoN_Lane, Definitions.Right].X = 95.25f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.StoN_Lane, Definitions.Right].Y = 97.1f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.EtoW_Lane, Definitions.Right].X = 97.1f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.EtoW_Lane, Definitions.Right].Y = 91.75f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.NtoS_Lane, Definitions.Right].X = 91.75f;
            Coordinate.TurnPreXY[Definitions.BigCar, Definitions.NtoS_Lane, Definitions.Right].Y = 89.9f;

            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.WtoE_Lane, Definitions.Left].X = 94.38f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.WtoE_Lane, Definitions.Left].Y = 95.25f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.StoN_Lane, Definitions.Left].X = 95.25f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.StoN_Lane, Definitions.Left].Y = 92.62f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.EtoW_Lane, Definitions.Left].X = 92.62f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.EtoW_Lane, Definitions.Left].Y = 91.75f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.NtoS_Lane, Definitions.Left].X = 91.75f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.NtoS_Lane, Definitions.Left].Y = 94.38f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.WtoE_Lane, Definitions.Right].X = 90.88f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.WtoE_Lane, Definitions.Right].Y = 95.25f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.StoN_Lane, Definitions.Right].X = 95.25f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.StoN_Lane, Definitions.Right].Y = 96.12f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.EtoW_Lane, Definitions.Right].X = 96.12f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.EtoW_Lane, Definitions.Right].Y = 91.75f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.NtoS_Lane, Definitions.Right].X = 91.75f;
            Coordinate.TurnPreXY[Definitions.SmallCar, Definitions.NtoS_Lane, Definitions.Right].Y = 90.88f;

            //转弯前车辆的弧度
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Left, Definitions.FrontMiddle] = (float)Math.Atan(3.4f / 5.25f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Left, Definitions.FrontLeft] = (float)Math.Atan(3.4f / 4.45f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Left, Definitions.FrontRight] = (float)Math.Atan(3.4f / 6.05f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Left, Definitions.BackLeft] = -(float)Math.Atan(1.1f / 4.45f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Left, Definitions.BackRight] = -(float)Math.Atan(1.1f / 6.05f);

            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Right, Definitions.FrontMiddle] = (float)Math.Atan(3.4f / 5.25f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Right, Definitions.FrontLeft] = (float)Math.Atan(3.4f / 6.05f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Right, Definitions.FrontRight] = (float)Math.Atan(3.4f / 4.45f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Right, Definitions.BackLeft] = -(float)Math.Atan(1.1f / 6.05f);
            Coordinate.TurnPreRadian[Definitions.BigCar, Definitions.Right, Definitions.BackRight] = -(float)Math.Atan(1.1f / 4.45f);

            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Left, Definitions.FrontMiddle] = (float)Math.Atan(2.88f / 3.75f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Left, Definitions.FrontLeft] = (float)Math.Atan(2.88f / 3f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Left, Definitions.FrontRight] = (float)Math.Atan(2.88f / 4.5f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Left, Definitions.BackLeft] = -(float)Math.Atan(0.72f / 3f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Left, Definitions.BackRight] = -(float)Math.Atan(0.72f / 4.5f);

            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Right, Definitions.FrontMiddle] = (float)Math.Atan(2.88f / 3.75f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Right, Definitions.FrontLeft] = (float)Math.Atan(2.88f / 4.5f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Right, Definitions.FrontRight] = (float)Math.Atan(2.88f / 3f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Right, Definitions.BackLeft] = -(float)Math.Atan(0.72f / 4.5f);
            Coordinate.TurnPreRadian[Definitions.SmallCar, Definitions.Right, Definitions.BackRight] = -(float)Math.Atan(0.72f / 3f);

            /************************************************************************/
            /* 直线状态，用于直线状态下X、Y坐标的更新，转弯前                                                                     */
            /************************************************************************/
            /*由西向东方向*/
            Coordinate.CoordinateOrigin[Definitions.WtoE_Lane].X = 0.0f;
            Coordinate.CoordinateOrigin[Definitions.WtoE_Lane].Y = 95.25f;
            Coordinate.CoordinateDestination[Definitions.WtoE_Lane].X = 187.0f;
            Coordinate.CoordinateDestination[Definitions.WtoE_Lane].Y = 95.25f;//由于运算中精度问题，一般难以为95.25，所以运算过程中不进行改值的比较
            /*由东向西方向*/
            Coordinate.CoordinateOrigin[Definitions.EtoW_Lane].X = 187.0f;
            Coordinate.CoordinateOrigin[Definitions.EtoW_Lane].Y = 91.75f;
            Coordinate.CoordinateDestination[Definitions.EtoW_Lane].X = 0.0f;
            Coordinate.CoordinateDestination[Definitions.EtoW_Lane].Y = 91.75f;//由于运算中精度问题，一般难以为91.75，所以运算过程中不进行改值的比较
            /*由北向南方向*/
            Coordinate.CoordinateOrigin[Definitions.NtoS_Lane].X = 91.75f;
            Coordinate.CoordinateOrigin[Definitions.NtoS_Lane].Y = 0.0f;
            Coordinate.CoordinateDestination[Definitions.NtoS_Lane].X = 91.75f;//由于运算中精度问题，一般难以为91.75，所以运算过程中不进行改值的比较
            Coordinate.CoordinateDestination[Definitions.NtoS_Lane].Y = 187.0f;
            /*由南向北方向*/
            Coordinate.CoordinateOrigin[Definitions.StoN_Lane].X = 95.25f;
            Coordinate.CoordinateOrigin[Definitions.StoN_Lane].Y = 187.0f;
            Coordinate.CoordinateDestination[Definitions.StoN_Lane].X = 95.25f;//由于运算中精度问题，一般难以为95.25，所以运算过程中不进行改值的比较
            Coordinate.CoordinateDestination[Definitions.StoN_Lane].Y = 0.0f;

            /*由西向东的方向*/
            Coordinate.CoordinateStrFactor[Definitions.WtoE_Lane].X = 1.0f;
            Coordinate.CoordinateStrFactor[Definitions.WtoE_Lane].Y = 0.0f;
            /*由东向西的方向*/
            Coordinate.CoordinateStrFactor[Definitions.EtoW_Lane].X = -1.0f;
            Coordinate.CoordinateStrFactor[Definitions.EtoW_Lane].Y = 0.0f;
            /*由北向南的方向*/
            Coordinate.CoordinateStrFactor[Definitions.NtoS_Lane].X = 0.0f;
            Coordinate.CoordinateStrFactor[Definitions.NtoS_Lane].Y = 1.0f;
            /*由南向北的方向*/
            Coordinate.CoordinateStrFactor[Definitions.StoN_Lane].X = 0.0f;
            Coordinate.CoordinateStrFactor[Definitions.StoN_Lane].Y = -1.0f;

            /************************************************************************/
            /* 转弯状态中                                                                     */
            /************************************************************************/
            /*由西向东的方向*/
            Coordinate.CircleFactor[Definitions.WtoE_Lane, Definitions.Left].X = 1.0f;
            Coordinate.CircleFactor[Definitions.WtoE_Lane, Definitions.Left].Y = -1.0f;
            Coordinate.CircleFactor[Definitions.WtoE_Lane, Definitions.Right].X = 1.0f;
            Coordinate.CircleFactor[Definitions.WtoE_Lane, Definitions.Right].Y = 1.0f;
            /*由东向西的方向*/
            Coordinate.CircleFactor[Definitions.EtoW_Lane, Definitions.Left].X = -1.0f;
            Coordinate.CircleFactor[Definitions.EtoW_Lane, Definitions.Left].Y = 1.0f;
            Coordinate.CircleFactor[Definitions.EtoW_Lane, Definitions.Right].X = -1.0f;
            Coordinate.CircleFactor[Definitions.EtoW_Lane, Definitions.Right].Y = -1.0f;
            /*由北向南的方向*/
            Coordinate.CircleFactor[Definitions.NtoS_Lane, Definitions.Left].X = 1.0f;
            Coordinate.CircleFactor[Definitions.NtoS_Lane, Definitions.Left].Y = 1.0f;
            Coordinate.CircleFactor[Definitions.NtoS_Lane, Definitions.Right].X = -1.0f;
            Coordinate.CircleFactor[Definitions.NtoS_Lane, Definitions.Right].Y = 1.0f;
            /*由南向北的方向*/
            Coordinate.CircleFactor[Definitions.StoN_Lane, Definitions.Left].X = -1.0f;
            Coordinate.CircleFactor[Definitions.StoN_Lane, Definitions.Left].Y = -1.0f;
            Coordinate.CircleFactor[Definitions.StoN_Lane, Definitions.Right].X = 1.0f;
            Coordinate.CircleFactor[Definitions.StoN_Lane, Definitions.Right].Y = -1.0f;
        }
    }
}
